package com.thinkcube.edutainment.domain.data;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class MessageData implements Parcelable{

	@JsonProperty("id")
	String id;

	@JsonProperty("owner")
	String owner;

	@JsonProperty("users")
	List<String> users;

	@JsonProperty("createdDate")
	String createdDate;

	@JsonProperty("msgId")
	String msgId;

	@JsonProperty("message")
	String message;

	@JsonProperty("subject")
	String subject;

	@JsonProperty("category")
	String category;
	@JsonProperty("status")
	String status;

	@JsonProperty("sender_name")
	String senderName;

	@JsonProperty("searchTerms")
	String searchTerms;

	@JsonProperty("to_names")
	List<String> toNames;

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOwner() {
		return this.owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	public List<String> getUsers() {
		return this.users;
	}

	public void setUsers(List<String> users) {
		this.users = users;
	}

	public String getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(String createdDate) {
		this.createdDate = createdDate;
	}

	public String getMsgId() {
		return this.msgId;
	}

	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}

	public String getMessage() {
		return this.message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getSubject() {
		return this.subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getCategory() {
		return this.category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSenderName() {
		return this.senderName;
	}

	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}

	public String getSearchTerms() {
		return this.searchTerms;
	}

	public void setSearchTerms(String searchTerms) {
		this.searchTerms = searchTerms;
	}

	public List<String> getToNames() {
		return this.toNames;
	}

	public void setToNames(List<String> toNames) {
		this.toNames = toNames;
	}

	protected MessageData(Parcel in) {
		id = in.readString();
		owner = in.readString();
		users = new ArrayList<String>();
		in.readList(users, null);
		createdDate = in.readString();
		msgId = in.readString();
		message = in.readString();
		subject = in.readString();
		category = in.readString();
		status = in.readString();
		senderName = in.readString();
		searchTerms = in.readString();
		toNames = new ArrayList<String>();
		in.readList(toNames, null);
	}

	public MessageData() {
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(owner);
		dest.writeList(users);
		dest.writeValue(createdDate);
		dest.writeString(msgId);
		dest.writeString(message);
		dest.writeString(subject);
		dest.writeString(category);
		dest.writeString(status);
		dest.writeString(senderName);
		dest.writeString(searchTerms);
		dest.writeList(toNames);
	}

	public static final Parcelable.Creator<MessageData> CREATOR = new Parcelable.Creator<MessageData>() {
		public MessageData createFromParcel(Parcel in) {
			return new MessageData(in);
		}

		public MessageData[] newArray(int size) {
			return new MessageData[size];
		}
	};
}
